<?php

namespace common\entities\myhtsq;

use Yii;

/**
 * This is the model class for table "myscrm_violated_contract".
 *
 * @property string $violated_contract_id
 * @property string $contract_code
 * @property string $violated_principal
 * @property string $violated_category_id
 * @property string $violated_littler_category_id
 * @property string $violated_content
 * @property string $approver
 * @property string $approve_comment
 * @property string $alternative_solution
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class ViolatedContractEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_violated_contract';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['violated_contract_id'], 'safe'],
            [['violated_content', 'approve_comment', 'alternative_solution'], 'string'],
            [['created_on', 'modified_on'], 'safe'],
            [['violated_contract_id', 'violated_principal', 'violated_category_id', 'violated_littler_category_id', 'approver', 'created_by', 'modified_by'], 'string', 'max' => 36],
            [['contract_code'], 'string', 'max' => 200]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'violated_contract_id' => '违规合同ID',
            'contract_code' => '合同编号',
            'violated_principal' => '违规责任人',
            'violated_category_id' => '违规大类ID',
            'violated_littler_category_id' => '违规小类ID',
            'violated_content' => '违规内容',
            'approver' => '审批人',
            'approve_comment' => '审批意见',
            'alternative_solution' => '变通方案',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
        ];
    }
}
